package org.nch.videoLauncher.domain;/**
 * Created by IntelliJ IDEA.
 * User: bill
 * Date: Dec 30, 2008
 * Time: 7:27:51 PM
 * To change this template use File | Settings | File Templates.
 */
public abstract class BaseEntity {

    private Integer id;
    private Integer version;

    protected BaseEntity() {
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getVersion() {
        return version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }

    public boolean equals(Object o){
        if (!(o instanceof BaseEntity))
             return false;
         BaseEntity other = (BaseEntity) o;
         return (this.getId().intValue() == other.getId().intValue());
    };

    public int hashCode(){
        return this.getId().hashCode();
    };
    
}
